<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>天天生鲜-用户中心</title>
	<link rel="stylesheet" type="text/css" href="css/reset.css">
	<link rel="stylesheet" type="text/css" href="css/main.css">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<script src="js/sweetalert.min.js"></script>
	<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
    <link href="css/sweetalert.css" rel="stylesheet">

</head>
<% 
	Object pre_global_info_user_name = request.getSession().getAttribute("account");
	String global_info_user_name = null == pre_global_info_user_name ? "" : pre_global_info_user_name.toString();
	request.getSession().setAttribute("pre-page", request.getServletPath());
%>
<body>
	<div class="header_con">
		<div class="header">
			<div class="welcome fl">欢迎来到饭否!</div>
			<div class="fr">
				<div class="login_info fl">
					欢迎您：<em><%= null == pre_global_info_user_name ? global_info_user_name : "请登录" %></em>
				</div>
				<% if(null == pre_global_info_user_name) { %>
				<div class="login_btn fl">
					<a href="/FAFCode/UserManagement/login.jsp">登录</a>
					<span>|</span>
					<a href="/FAFCode/UserManagement/register.jsp">注册</a>
				</div>
				<% } else { %>
				<div class="user_link fl">
					<a href="/FAFCode/UserManagement/user_center_info.jsp">用户中心</a>
					<span>|</span>
					<a href="/FAFCode/MyCart">我的购物车</a>
					<span>|</span>
					<a href="/FAFCode/UserManagement/user_center_order.jsp">我的订单</a>
				</div>
				<% } %>
			</div>
		</div>		
	</div>

	<div class="search_bar clearfix">
		<a href="/FAFCode/Index" class="logo fl"><img src="images/logo.png"></a>
		<div class="sub_page_name fl">|&nbsp;&nbsp;&nbsp;&nbsp;用户中心</div>
		<div class="search_con fr">
			<input type="text" class="input_text fl" name="" placeholder="搜索商品">
			<input type="button" class="input_btn fr" name="" value="搜索">
		</div>		
	</div>

	<div class="main_con clearfix">
		<div class="left_menu_con clearfix">
			<h3>用户中心</h3>
			<ul>
				<li><a href="user_center_info.jsp" >· 个人信息</a></li>
				<li><a href="user_center_order.jsp">· 全部订单</a></li>
				<li><a href="user_center_site.jsp">· 收货地址</a></li>
				<li><a href="user_center_update.jsp" class="active">· 个人信息修改</a></li>
				<li><a href="user_center_pwd.jsp" >· 修改密码</a></li>
			</ul>
		</div>
		<div class="right_content clearfix">
			<div class="info_con clearfix">
				<h3><font face=微软雅黑  size=5 style="font-weight:100"><b>基本信息：</b></font></h3>
					<ul class="user_info_list2">
						<form action="../UserManagement">
							<table align="left" width="400">
								<tr>
									<td width="120" height="20" align="right" style="font-weight:100"><font face=微软雅黑  size=3.5 >
										<b>登录帐号：</b></font>
									</td>
									<td width="232">
										 <%
											Object obj_account = session.getAttribute("account");
											if(null!=obj_account){
										 %> 
										 <INPUT TYPE="text" SIZE="24" name="account" id="account" 
											onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height:25px;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											 value=<%=java.net.URLDecoder.decode(obj_account.toString(),"UTF-8")%> readonly="readonly">
											 <%-- <input type="text" name="account" id="account" class="input" maxlength="32" value=<%=java.net.URLDecoder.decode(obj_account.toString(),"UTF-8")%> readonly="readonly"
											 size="24" style="width:150; height:23px" style="font-size:15px;"> --%>
										 <%
											}
											else{
										 %>
											<INPUT TYPE="text" SIZE="24" name="account" id="account" 
											onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height:25px;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											placeholder="账号信息待完善" readonly="readonly">
										 <%
											}
										 %>
									</td>
								</tr>
								<tr>
								
									<td width="120" height="20" align="right" style="font-weight:100"><font face=微软雅黑  size=3.5 >
									<font color="red">*</font>
										<b>密码：</b></font>
									</td>
									<td width="232" height="20">
										<%
											Object obj_pwd = session.getAttribute("password");
											if(null!=obj_pwd){
										%> 
										<input type="password" name="password" id="password"  SIZE="24" 
											onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height: 25px;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											value=<%=java.net.URLDecoder.decode(obj_pwd.toString(),"UTF-8")%> readonly="readonly"
										>
										 <%
											}else{
										 %>
										 <input type="text" name="password" id="password"  SIZE="24" 
											onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height:25px;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											 placeholder="请完善密码信息" readonly="readonly">
										 <%
											 }
										 %>
									</td>
								</tr>
								<tr>
									<td width="120" height="20" align="right" style="font-weight:100"><font face=微软雅黑  size=3.5>
									<font color="red">*</font>
										<b>真实姓名：</b></font>
									</td>
									<td width="232" height="20">
									<%
											Object obj_name = session.getAttribute("name");
											if(null!=obj_name){
									%> 
										<input type="text" name="realName" id="realName"  SIZE="24" 
											onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height:25px;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											value="<%=java.net.URLDecoder.decode(obj_name.toString(),"UTF-8")%>">
									<%
											}else{
									%>
										<input type="text" name="realName" id="realName"  SIZE="24" 
											onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height: 25px;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											style="border-width:1px;border-color=white"
											placeholder="请完善姓名信息" >
									<%
											}
									%>
									</td>
								</tr>
								<tr>
									<td width="120" height="20" align="right" style="font-weight:100"><font face=微软雅黑  size=3.5 >
										<b>性别：</b></font>
									</td>
									
									<td width="232" height="20" >
									<%
											Object obj_sex = session.getAttribute("sex");
											if(null!=obj_sex){
												if(java.net.URLDecoder.decode(obj_sex.toString(),"UTF-8").equals("男")){
									%> 
										<input type="radio" checked="checked" name="sex" id="man" value="男" />男
										<input type="radio" name="sex" id="woman" value="女"/>女
									<%
												}if(java.net.URLDecoder.decode(obj_sex.toString(),"UTF-8").equals("女")){
									%>
										<input type="radio" name="sex" id="man" value="男" />男
										<input type="radio" checked="checked" name="sex" id="woman" value="女"/>女
									<%
												}
												}else{
									%>
											<input type="radio" checked="checked" name="sex" id="man"  value="男"/>男
											<input type="radio" name="sex" id="woman"  value="女"/>女
									<%
											}
									%>
									</td>
								</tr>
								<tr>
									<td width="120" height="20" align="right" style="font-weight:100"><font face=微软雅黑  size=3.5 >
										<b>年龄：</b></font>
									</td>
									<td width="232" height="20" >
									<%
											Object obj_age = session.getAttribute("age");
											if(null!=obj_age){
									%> 
										<input type="text" name="age" id="age" SIZE="24" 
											onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height: 25px ;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											value="<%=java.net.URLDecoder.decode(obj_age.toString(),"UTF-8")%>">
									<%
											}else{
									%>
										<input type="text" name="age" id="age" SIZE="24" 
											onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height: 25px ;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											placeholder="请完善年龄信息" >
									<%
											}
									%>
									</td>
								</tr>
								<tr>
									<td width="120" height="20" align="right" style="font-weight:100"><font face=微软雅黑  size=3.5 >
										<b>家乡：</b></font>
									</td>
									<td width="232" height="20" >
									<%
											Object obj_hometown = session.getAttribute("hometown");
											if(null!=obj_hometown){
									%> 
										<input type="text" name="homeTown" id="homeTown" SIZE="24" 
											onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height: 25px ;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											value="<%=java.net.URLDecoder.decode(obj_hometown.toString(),"UTF-8")%>">
									<%
											}else{
									%>
										<input type="text" name="homeTown" id="homeTown"SIZE="24" 
											onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height: 25px ;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											placeholder="请完善家乡信息" >
									<%
											}
									%>
									</td>
								</tr>
								<tr>
									<td width="120" height="20" align="right" style="font-weight:100"><font face=微软雅黑  size=3.5 >
									<font color="red">*</font>
										<b>地址：</b></font>
									</td>
									<td width="232" height="20" >
									<%
											Object obj_address = session.getAttribute("address");
											if(null!=obj_address){
									%> 
										<input type="text" name="address" id="address"SIZE="24" 
											onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height: 25px ;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											value="<%=java.net.URLDecoder.decode(obj_address.toString(),"UTF-8")%>">
									<%
											}else{
									%>
										<input type="text" name="address" id="address" SIZE="24" 
											onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height: 25px ;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											placeholder="请完善地址信息"  >
									<%
											}
									%>
									</td>
								</tr>
								<tr>
									<td width="120" height="20" align="right" style="font-weight:100"><font face=微软雅黑  size=3.5 >
									<font color="red">*</font>
										<b>手机号：</b></font>
									</td>
									<td width="232" height="20" >
									<%
											Object obj_phone = session.getAttribute("phone");
											if(null!=obj_phone){
									%> 
										<input type="text" name="phone" id="phone" SIZE="24" 
										onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height: 25px ;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											value="<%=java.net.URLDecoder.decode(obj_phone.toString(),"UTF-8")%>">
									<%
											}else{
									%>
										<input type="text" name="phone" id="phone"SIZE="24" 
											onmouseover="this.style.borderColor='white';this.style.backgroundColor='lightblue'" 
											style="width: 106; height: 25px ;background:transparent;border:1px solid #f9f9f9" 
											onmouseout="this.style.borderColor='white';this.style.backgroundColor='#f9f9f9'" 
											style="border-width:1px;border-color=white"
											placeholder="请完善手机号信息" >
									<%
											}
									%>	
									</td>
								</tr>
								<tr>
									<td width="120" height="20" align="right" style="font-weight:100"><font face=微软雅黑  size=3.5 >
										<b>账号注册时间：</b></font>
									</td>
									<td width="232" height="20" >
									<%
											Object obj_signDate = session.getAttribute("signDate");
											if(null!=obj_signDate){
									%> 
										<input type="text" name="accontTime" id="accontTime" class="input" height: 25px  maxlength="50" disabled="disabled" value=<%=java.net.URLDecoder.decode(obj_signDate.toString(),"UTF-8")%> size="24" style="width:150; height:22px">
									<%
											}else{
									%>
											<input type="text" name="accontTime" id="accontTime" class="input" height: 25px  maxlength="50" disabled="disabled" placeholder="请完善账号注册时间" size="24" style="width:150; height:22px">
									<%
											}
									%>
									</td>
								</tr>
								<tr>
									<td align="center" colspan="2" >
										<br>
										<input type="submit" id="submit" value="提交" class="info_submit" style="margin-right:100px;">
										<input type="hidden" name="edit" id="edit" value="1">
									</td>
								</tr>	
						</table>
					</form>
				</ul>
			</div>
		</div>
	</div>
	<div class="footer">
		<div class="foot_link">
			<a href="#">关于我们</a>
			<span>|</span>
			<a href="#">联系我们</a>
			<span>|</span>
			<a href="#">招聘人才</a>
			<span>|</span>
			<a href="#">友情链接</a>		
		</div>
		<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>
		<p>电话：010-****888    京ICP备*******8号</p>
	</div>
	<script type="text/javascript">
	$('#submit').click(function () {
	    swal({
	        title: "太帅了",
	        text: "保存成功",
	        type: "success",
	        showConfirmButton: false
	        
	    });
	});
	
	
	</script>
</body>
</html>